﻿using DX_sharq.core;
using DX_sharq.Models;
using MyCrypto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DX_sharq.Controllers
{
    public class AdminController : Controller
    {
        Linq_sharqDB1DataContext db = new Linq_sharqDB1DataContext();
        CookieClass _Cookie = new CookieClass();
        Helper help_list = new Helper();
        Crypto _crypto = new Crypto();
        Key item = new Key();

        #region Index
        [SecurityForAttributeAdmin]
        public ActionResult Admin_Index()
        {
            ViewBag.bugun = "бугун " + help_list.getSanaTuliq(DateTime.Now);
            return View();
        }


        [SecurityForAttributeAdmin]
        public ActionResult getNews()
        {
            ViewBag.news = db.get_News_user().ToList();
            return PartialView();
        }
            
        #endregion
    }
}
